Repository navigation
research(ui): fix BCD calibration peer dual-axis resize contract (#29) - #333
Merged
JavaZeroo merged 3 commits intoNov 11, 2026
Merged
Conversation
The calibration peer inherited the baseline BoundPeer width-only guard, which raised "Resize changed row count" when the fixed 80x24 -> 60x12 resize NAWS arrived, so phase 1 never completed and the 2026-11-09 calibration stopped after phase 0 with frozen_grid still [80,24]. Override the NAWS gate inside the calibration probe only; the baseline width-only contract stays unchanged. The calibration contract allows exactly the plan size-change sequence 80x24 -> 60x12 -> 80x24: phases 1/3 are resize events and each armed resize must be acknowledged by a new post-request NAWS at the target grid (stale or same-size events never count); phase 2 is a same-size observation checkpoint with no resize action and no new NAWS required, duplicate same-size events are recorded only, and any unexpected size change fails. Expectations come from the fixed plan constants, never from observed ranges. Record initial_grid, expected_size_change_sequence, naws_size_changes, phase_ready_events, phase2_observed_naws and phase2_new_naws_required=false, and audit them; the four fixed windows/grids and all prior assertions stay unchanged. Offline peer simulation covers the dual-axis flow with and without a checkpoint duplicate plus stale-ready, unarmed-change, wrong-grid and wrong-request rejections, and the mechanics audit tamper checks. This does not close #27 or #29, does not choose A/B/C, and does not change product behavior. Co-authored-by: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com>
The v1 B/C/D pre-write probe reused the same baseline BoundPeer row-count guard as the calibration peer, so its fixed 80x24 -> 60x12 -> 60x12 -> 80x24 resize would hit the same "Resize changed row count" failure at phase 1 (static conclusion from the shared inheritance; the old v1 run never reached that point). Apply the identical calibration NAWS contract override inside this probe: size changes must follow the plan sequence 80x24 -> 60x12 -> 80x24, armed resizes need a new post-request target-grid NAWS, the phase-2 checkpoint requires no new NAWS and records same-size duplicates only, and any unexpected size change fails. Specific differences from the calibration probe: only the _on_naws override and its naws_size_changes recording are added here; the windows, grids, phase bodies, document allowlist and the literal mechanics acceptance are unchanged, and no calibration-only audit fields are required. An offline socket-free simulation of the four-phase NAWS/DSR/ack flow now completes with frozen grids [[80,24],[60,12],[60,12],[80,24]]. This does not close #27 or #29, does not choose A/B/C, and does not change product behavior; the old v1 plan, attempt marker and raw evidence stay untouched. Co-authored-by: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com>
Ledger for the single authorized calibration retry after the dual-axis peer contract fix: identity/environment checks stay read-only and bounded, the fixed source deploys only to a new staging copy (src-0 and the old plan/attempt/raw stay untouched), the display change is recorded and restored, and the frozen new plan runs once with first-failure stop. The v2 formal retry remains gated on a fully successful calibration. This does not close #27 or #29 and does not choose A/B/C. Co-authored-by: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com>
JavaZeroo-Bot
added a commit
that referenced
this pull request
Nov 12, 2026
…ecord-hidden-retention-2e7373117ea0 Union both sides: keep the bounded autoscroll Qt target/CTest entry and the #324 system paste, #333 BCD fixtures, #330/#331 packaging and #328 eight-session capabilities with their assertions. Co-authored-by: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
诊断
research/ui/resize_bcd_calibration.py的校准 peer 继承resize_state_reference.BoundPeer的只缩宽固定行数守卫(resize_state_reference.py:85):初始冻结后任何 NAWS 行数必须等于 24。校准计划固定80×24 -> 60×12 -> 60×12 -> 80×24,phase1 目标60×12到达时_on_naws在_phase_ready(1)之前抛出Resize changed row count,导致 frozen_grid 仍[80,24]、phase1 未完成。2026-11-09 失败证据(peer.json:naws_history=[[80,24],[60,12]]、resize_armed=1、error=Resize changed row count)与该静态结论精确吻合。确认 NAWS 到达不等于完成可用校准;该错误是控制器测试合同错误,不能归因 WindTerm 缺陷。修复(不改
resize_state_reference.py只缩宽合同)resize_bcd_calibration.py:覆盖_on_naws为校准专用合同——尺寸变化仅允许计划序列80×24 -> 60×12 -> 80×24;phase1/3 是尺寸变化事件,必须在 request/armed 后出现新的目标 NAWS(禁止旧事件冒充,_phase_ready边界检查全部保留);phase2 是同尺寸观测 checkpoint(988×509/60×12),无 resize 动作、不要求新 NAWS,同尺寸重复只记录,未预期尺寸变化即失败。initial_grid、expected_size_change_sequence、naws_size_changes、phase_ready_events、phase2_observed_naws、phase2_new_naws_required=false、frozen_grid_history,并在audit_mechanics增加对应校验(只增不删,旧断言全保留)。resize_bcd_address_reference.py(v2 夹具)复用同一错误守卫,按授权一并修复:仅增加同一_on_naws覆盖与naws_size_changes记录;窗口、网格、相位正文、文档白名单与字面验收不变。具体差异见提交说明。stableGrid与新合同兼容)。离线验证(无 socket、无原版运行时)
research/ui/test_resize_bcd_calibration.py(已注册 CTest):双轴流程在有/无 checkpoint 同尺寸重复 NAWS 下均 4/4 phase 完成;stale-ready / unarmed-change / wrong-grid / wrong-request 均按预期失败;audit 对naws_size_changes/phase_ready_events/phase2_observed_naws篡改拒绝。[[80,24],[60,12],[60,12],[80,24]]。test_resize_bcd_address_reference、test_resize_state_reference、test_export_resize_state_reference共 26 项全部通过。边界
7718a4b8…、marker20fd56d7…、旧失败/raw 全部不变;feat(qt): add bounded system paste entries #324/feat(qt): bounded selection auto-scroll across history #327/IME 未触碰。🤖 Generated with Kimi K3 (ai-gateway/kimi-k3)